package com.cqu.hospitalsystem.controller;

import com.cqu.hospitalsystem.service.AdminService;
import com.cqu.hospitalsystem.utils.result.DataResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("admin")
@Tag(name = "adminController", description = "管理员")
public class AdminController {

    @Resource
    private AdminService adminService;

    @GetMapping("backupDB")
    @Operation(summary = "备份数据库", description = "备份数据库")
    public DataResult backupDB(){
        return adminService.backupDB();
    }
}
